<!--{template common/header_postv3}-->
<!-- header start -->
<header class="header">
    <div class="nav">
		<input type="hidden" name="{if $_GET[action] == 'newthread'}topicsubmit{elseif $_GET[action] == 'reply'}replysubmit{elseif $_GET[action] == 'edit'}editsubmit{/if}" value="yes">
		<a href="javascript:history.go(-1);" class="z"><img src="{STATICURL}image/mobile/images/icon_back.png" /></a>
    </div>
</header>
<!-- header end -->
<!--{if $special != 2 && $special != 4 && !($isfirstpost && $sortid)}-->

<!--{eval $adveditor = $isfirstpost && $special && ($_GET['action'] == 'newthread' || $_GET['action'] == 'reply' && !empty($_GET['addtrade']) || $_GET['action'] == 'edit' );}-->



<form method="post" id="postform" 

			{if $_GET[action] == 'newthread'}action="forum.php?mod=post&action={if $special != 2}newthread{else}newtrade{/if}&fid=$_G[fid]&extra=$extra&topicsubmit=yes&mobile=2"

			{elseif $_GET[action] == 'reply'}action="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&extra=$extra&replysubmit=yes&mobile=2"

			{elseif $_GET[action] == 'edit'}action="forum.php?mod=post&action=edit&extra=$extra&editsubmit=yes&mobile=2" $enctype

			{/if}>

<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />

<input type="hidden" name="posttime" id="posttime" value="{TIMESTAMP}" />

<!--{if !empty($_GET['modthreadkey'])}--><input type="hidden" name="modthreadkey" id="modthreadkey" value="$_GET['modthreadkey']" /><!--{/if}-->

<!--{if $_GET[action] == 'reply'}-->

	<input type="hidden" name="noticeauthor" value="$noticeauthor" />

	<input type="hidden" name="noticetrimstr" value="$noticetrimstr" />

	<input type="hidden" name="noticeauthormsg" value="$noticeauthormsg" />

	<!--{if $reppid}-->

		<input type="hidden" name="reppid" value="$reppid" />

	<!--{/if}-->

	<!--{if $_GET[reppost]}-->

		<input type="hidden" name="reppost" value="$_GET[reppost]" />

	<!--{elseif $_GET[repquote]}-->

		<input type="hidden" name="reppost" value="$_GET[repquote]" />

	<!--{/if}-->

<!--{/if}-->

<!--{if $_GET[action] == 'edit'}-->

	<input type="hidden" name="fid" id="fid" value="$_G[fid]" />

	<input type="hidden" name="tid" value="$_G[tid]" />

	<input type="hidden" name="pid" value="$pid" />

	<input type="hidden" name="page" value="$_GET[page]" />

<!--{/if}-->



<!--{if $special}-->

	<input type="hidden" name="special" value="$special" />

<!--{/if}-->

<!--{if $specialextra}-->

	<input type="hidden" name="specialextra" value="$specialextra" />

<!--{/if}-->



<!-- header start -->






<div data-role="header" role="banner">

  <div class="ui-bar ui-bar-c postBtn2 threadHead" data-position="inline">

    <div data-role="controlgroup" data-type="horizontal"> 

      <!--{if $_G['forum']['type'] != 'sub'}--> 

      <!--{else}--> 

      <!--{if $_G['forum']['status'] != 3}--> 

      <a href="forum.php" data-icon="home" data-transition="none">{$_G['setting']['navs'][2]['navname']}</a>

      </li>

      <a href="forum.php?mod=forumdisplay&fid={$_G['forum']['fid']}" data-icon="arrow-r" data-role="button" data-theme="b" data-transition="none">{$_G['forum']['name']}</a> <a href="$upnavlink" data-icon="arrow-u" data-transition="none">{eval echo strip_tags($_G['forum']['name']) ? strip_tags($_G['forum']['name']) : $_G['forum']['name'];}</a> 

      <!--{else}--> 

      <a href="group.php" data-icon="grid" data-role="button" data-theme="a" data-transition="none">$_G['setting']['navs'][3]['navname']</a> 

      <!--{/if}--> 

      <!--{/if}--> 

    </div>




    

    

    </div>

</div>

<div data-role="content" class="contentDiv"> 







<!-- header end -->



<!-- main postbox start -->

<div class="wp">

	<div class="post_from">

		<ul class="cl">

			<li class="bl_line">

			<!--{if $_GET['action'] != 'reply'}-->

			<input type="text" tabindex="1" class="px" id="needsubject" size="30" autocomplete="off" value="$postinfo[subject]" name="subject" placeholder="{lang thread_subject}" fwin="login">

			<!--{else}-->

				RE: $thread['subject']

				<!--{if $quotemessage}-->$quotemessage<!--{/if}-->

			<!--{/if}-->

			</li>

			<!--{if $isfirstpost && !empty($_G['forum'][threadtypes][types])}-->

			<li class="bl_line">

				<select id="typeid" name="typeid" class="sort_sel">

					<option value="0" selected="selected">{lang select_thread_catgory}</option>

					<!--{loop $_G['forum'][threadtypes][types] $typeid $name}-->

					<!--{if empty($_G['forum']['threadtypes']['moderators'][$typeid]) || $_G['forum']['ismoderator']}-->

					<option value="$typeid"{if $thread['typeid'] == $typeid || $_GET['typeid'] == $typeid} selected="selected"{/if}><!--{echo strip_tags($name);}--></option>

					<!--{/if}-->

					<!--{/loop}-->

				</select>

			</li>

			<!--{/if}-->

			<!--{if $_GET[action] == 'edit' && $isorigauthor && ($isfirstpost && $thread['replies'] < 1 || !$isfirstpost) && !$rushreply && $_G['setting']['editperdel']}-->

			<li class="bl_line">

				<input type="checkbox" name="delete" id="delete" class="pc" value="1" title="{lang post_delpost}{if $thread[special] == 3}{lang reward_price_back}{/if}"> {lang delete_check}

			</li>

			<!--{/if}-->

			<li class="bl_none area">

			<textarea class="pt" id="needmessage" tabindex="3" autocomplete="off" id="{$editorid}_textarea" name="$editor[textarea]" cols="80" rows="2"  placeholder="{lang thread_content}" fwin="reply">$postinfo[message]</textarea>

			</li>



<!--

			<li style="padding:0px;">

				<a href="javascript:;" class="y" style="background:url({STATICURL}image/mobile/images/icon_photo.png) no-repeat;overflow:hidden;">

					<input type="file" name="Filedata" id="filedata" style="width:30px;height:30px;font-size:30px;opacity:0;"/>

				</a>

			</li>

-->

		</ul>

<!--

        <div data-role="content" class=" ">

			<a href="javascript:;" class="y u179_photo" >

					<input type="file" name="Filedata" id="filedata" style="width:30px;height:30px;font-size:30px;opacity:0;"/>

			</a>

        </div>

-->        

        

		<ul id="imglist" class="post_imglist cl bl_line"></ul>

        

        <div data-role="content" class=" u179_photo ">

				<a href="javascript:;" class=" " style="margin:0 auto; " >

<!--

					<input type="file" name="Filedata" id="filedata" style="width:30px;height:30px;font-size:30px;opacity:0;"/>

-->
					<input type="file" name="Filedata" id="filedata" style="width:250px;height:30px;font-size:30px;opacity:0;"/>



				</a>

        </div>

		<!--{if $_GET[action] != 'edit' && checkperm('seccode') && ($secqaacheck || $seccodecheck)}-->

		<!--{subtemplate common/seccheck}-->

		<!--{/if}-->

	</div>

    

    <div data-role="content"  class=" ">

    <button id="postsubmit" class="btn_pn <!--{if $_GET[action] == 'edit'}-->btn_pn_blue" disable="false"<!--{else}-->btn_pn_grey" disable="true"<!--{/if}--> >

    <span><!--{if $_GET[action] == 'newthread'}-->{lang send_thread}<!--{elseif $_GET[action] == 'reply'}-->{lang join_thread}<!--{elseif $_GET[action] == 'edit'}-->{lang edit_save}<!--{/if}-->

    </span>

    </button>

 	<input type="hidden" name="{if $_GET[action] == 'newthread'}topicsubmit{elseif $_GET[action] == 'reply'}replysubmit{elseif $_GET[action] == 'edit'}editsubmit{/if}" value="yes">

    </div>

    

</div>

<!-- main postbox start -->

</form>

<!--{else}-->

	<div class="box xg1">

	<!--{if $special == '2'}-->

	{lang send_special_trade_error}

    <!--{elseif $special == '4'}-->

	{lang send_special_activity_error}

	<!--{elseif $isfirstpost && $sortid}-->

	{lang threadsort_error}

    <!--{/if}-->

    </div>

<!--{/if}-->



<script type="text/javascript">

	(function() {

		var needsubject = needmessage = false;



		<!--{if $_GET[action] == 'reply'}-->

			needsubject = true;

		<!--{elseif $_GET[action] == 'edit'}-->

			needsubject = needmessage = true;

		<!--{/if}-->



		<!--{if $_GET[action] == 'newthread' || ($_GET[action] == 'edit' && $isfirstpost)}-->

		$('#needsubject').on('keyup input', function() {

			var obj = $(this);

			if(obj.val()) {

				needsubject = true;

				if(needmessage == true) {

					$('.btn_pn').removeClass('btn_pn_grey').addClass('btn_pn_blue');

					$('.btn_pn').attr('disable', 'false');

				}

			} else {

				needsubject = false;

				$('.btn_pn').removeClass('btn_pn_blue').addClass('btn_pn_grey');

				$('.btn_pn').attr('disable', 'true');

			}

		});

		<!--{/if}-->

		$('#needmessage').on('keyup input', function() {

			var obj = $(this);

			if(obj.val()) {

				needmessage = true;

				if(needsubject == true) {

					$('.btn_pn').removeClass('btn_pn_grey').addClass('btn_pn_blue');

					$('.btn_pn').attr('disable', 'false');

				}

			} else {

				needmessage = false;

				$('.btn_pn').removeClass('btn_pn_blue').addClass('btn_pn_grey');

				$('.btn_pn').attr('disable', 'true');

			}

		});



		$('#needmessage').on('scroll', function() {

			var obj = $(this);

			if(obj.scrollTop() > 0) {

				obj.attr('rows', parseInt(obj.attr('rows'))+2);

			}

		}).scrollTop($(document).height());

	 })();

</script>

<script type="text/javascript" src="{STATICURL}js/mobile/ajaxfileupload.js?{VERHASH}"></script>

<script type="text/javascript" src="{STATICURL}js/mobile/buildfileupload.js?{VERHASH}"></script>

<script type="text/javascript">

	var imgexts = typeof imgexts == 'undefined' ? 'jpg, jpeg, gif, png' : imgexts;

	var STATUSMSG = {

		'-1' : '{lang uploadstatusmsgnag1}',

		'0' : '{lang uploadstatusmsg0}',

		'1' : '{lang uploadstatusmsg1}',

		'2' : '{lang uploadstatusmsg2}',

		'3' : '{lang uploadstatusmsg3}',

		'4' : '{lang uploadstatusmsg4}',

		'5' : '{lang uploadstatusmsg5}',

		'6' : '{lang uploadstatusmsg6}',

		'7' : '{lang uploadstatusmsg7}(' + imgexts + ')',

		'8' : '{lang uploadstatusmsg8}',

		'9' : '{lang uploadstatusmsg9}',

		'10' : '{lang uploadstatusmsg10}',

		'11' : '{lang uploadstatusmsg11}'

	};

	var form = $('#postform');

	$(document).on('change', '#filedata', function() {

			popup.open('<img src="' + IMGDIR + '/imageloading.gif">');



			uploadsuccess = function(data) {

				if(data == '') {

					popup.open('{lang uploadpicfailed}', 'alert');

				}

				var dataarr = data.split('|');

				if(dataarr[0] == 'DISCUZUPLOAD' && dataarr[2] == 0) {

					popup.close();

					$('#imglist').append('<li><span aid="'+dataarr[3]+'" class="del"><a href="javascript:;"><img src="{STATICURL}image/mobile/images/icon_del.png"></a></span><span class="p_img"><a href="javascript:;"><img style="height:54px;width:54px;" id="aimg_'+dataarr[3]+'" title="'+dataarr[6]+'" src="{$_G[setting][attachurl]}forum/'+dataarr[5]+'" /></a></span><input type="hidden" name="attachnew['+dataarr[3]+'][description]" /></li>');

				} else {

					var sizelimit = '';

					if(dataarr[7] == 'ban') {

						sizelimit = '{lang uploadpicatttypeban}';

					} else if(dataarr[7] == 'perday') {

						sizelimit = '{lang donotcross}'+Math.ceil(dataarr[8]/1024)+'K)';

					} else if(dataarr[7] > 0) {

						sizelimit = '{lang donotcross}'+Math.ceil(dataarr[7]/1024)+'K)';

					}

					popup.open(STATUSMSG[dataarr[2]] + sizelimit, 'alert');

				}

			};



			if(typeof FileReader != 'undefined' && this.files[0]) {//note 支持html5上传新特性

				

				$.buildfileupload({

					uploadurl:'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2',

					files:this.files,

					uploadformdata:{uid:"$_G[uid]", hash:"<!--{eval echo md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}-->"},

					uploadinputname:'Filedata',

					maxfilesize:"$swfconfig[max]",

					success:uploadsuccess,

					error:function() {

						popup.open('{lang uploadpicfailed}', 'alert');

					}

				});



			} else {



				$.ajaxfileupload({

					url:'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2',

					data:{uid:"$_G[uid]", hash:"<!--{eval echo md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}-->"},

					dataType:'text',

					fileElementId:'filedata',

					success:uploadsuccess,

					error: function() {

						popup.open('{lang uploadpicfailed}', 'alert');

					}

				});



			}

	});



	<!--{if 0 && $_G['setting']['mobile']['geoposition']}-->

	geo.getcurrentposition();

	<!--{/if}-->

	$('#postsubmit').on('click', function() {

		var obj = $(this);

		if(obj.attr('disable') == 'true') {

			return false;

		}



		obj.attr('disable', 'true').removeClass('btn_pn_blue').addClass('btn_pn_grey');

		popup.open('<img src="' + IMGDIR + '/imageloading.gif">');



		var postlocation = '';

		if(geo.errmsg === '' && geo.loc) {

			postlocation = geo.longitude + '|' + geo.latitude + '|' + geo.loc;

		}



		$.ajax({

			type:'POST',

			url:form.attr('action') + '&geoloc=' + postlocation + '&handlekey='+form.attr('id')+'&inajax=1',

			data:form.serialize(),

			dataType:'xml'

		})

		.success(function(s) {

			popup.open(s.lastChild.firstChild.nodeValue);

		})

		.error(function() {

			popup.open('{lang networkerror}', 'alert');

		});

		return false;

	});



	$(document).on('click', '.del', function() {

		var obj = $(this);

		$.ajax({

			type:'GET',

			url:'forum.php?mod=ajax&action=deleteattach&inajax=yes&aids[]=' + obj.attr('aid'),

		})

		.success(function(s) {

			obj.parent().remove();

		})

		.error(function() {

			popup.open('{lang networkerror}', 'alert');

		});

		return false;

	});



</script>

<!--{eval $nofooter = true;}-->



</div>

<!-- /content -->

















<!-- footer -->







<!--{hook/global_footer_mobile}-->

<!--{eval $useragent = strtolower($_SERVER['HTTP_USER_AGENT']);$clienturl = 'http://www.discuz.net/mobile.php?platform=android';}-->

<!--{if strpos($useragent, 'iphone') !== false || strpos($useragent, 'ios') !== false}-->

<!--{eval $clienturl = 'http://www.discuz.net/mobile.php?platform=ios';}-->

<!--{elseif strpos($useragent, 'android') !== false}-->

<!--{eval $clienturl = 'http://www.discuz.net/mobile.php?platform=android';}-->

<!--{elseif strpos($useragent, 'windows phone') !== false}-->

<!--{eval $clienturl = 'http://www.discuz.net/mobile.php?platform=windowsphone';}-->

<!--{/if}-->







<div id="mask" style="display:none;"></div>







<!--{if !$nofooter}-->

<div class="footer">

	<div>

		<!--{if !$_G[uid]}-->

<!--

		<a href="forum.php">{lang mobilehome}</a> | 

-->        

        <a href="member.php?mod=logging&action=login" title="{lang login}">{lang login}</a> | <a href="<!--{if $_G['setting']['regstatus']}-->member.php?mod={$_G[setting][regname]}<!--{else}-->javascript:;" style="color:#D7D7D7;<!--{/if}-->" title="{$_G['setting']['reglinkname']}">{lang register}</a>

		<!--{else}-->

		<a href="home.php?mod=space&uid={$_G[uid]}&do=profile&mycenter=1">$_G[username]</a> , <a href="member.php?mod=logging&action=logout&formhash={FORMHASH}" title="{lang logout}" class="dialog">{lang logout}</a>

		<!--{/if}-->

		<a href="{$_G['setting']['mobile']['simpletypeurl'][0]}" data-icon="bars" data-iconpos="top" data-ajax="false">{lang no_simplemobiletype}</a>

		<a href="$clienturl">{lang clientversion}</a> &copy; Comsenz Inc.

    </div>

</div>

<!--{/if}-->





</div>

<!--/content-->













</div>

<!--/page-->



</body>

</html>

<!--{eval updatesession();}-->

<!--{if defined('IN_MOBILE')}-->

	<!--{eval output();}-->

<!--{else}-->

	<!--{eval output_preview();}-->

<!--{/if}-->




<!--{template common/footer}-->
